//go:build prod

package main

import (
	"github.com/micro-plat/hydra"
	"github.com/micro-plat/hydra/conf/server/mqc"
	"github.com/micro-plat/hydra/conf/vars/queue/kafka"
)

func init() {

	//设置api服务器端口，自定义app配置信息,conf install时安装到配置中心，启动时从配置中心获取配置信息
	hydra.Conf.API("10161").Sub("app", map[string]interface{}{
		"topic":          "error-data",
		"duration_hours": 24,
		"fields":         "system_name,app_name,page_url,error_type",
	})
	hydra.Conf.MQC(mqc.WithKafka("kafka"))

	hydra.Conf.Vars().Queue().Kafka("kafka",
		"server01:30019,server02:30023,server03:30024",
		kafka.WithGroup("kafka-exporter"),
		kafka.WithOffset(true),
	)
}
